import 'package:delta_input_demo1/DeltaMode.dart';
import 'package:delta_input_demo1/Scene00SelectFirstThenDelete.dart';
import 'package:delta_input_demo1/Scene01SingleInsert.dart';
import 'package:delta_input_demo1/Scene02MultiInsert.dart';
import 'package:delta_input_demo1/Scene03SingleDelete.dart';
import 'package:delta_input_demo1/Scene04BatchDelete.dart';
import 'package:delta_input_demo1/Scene05Replace.dart';
import 'package:delta_input_demo1/Scene06UndoRedo.dart';
import 'package:delta_input_demo1/Scene07CursorMove.dart';
import 'package:delta_input_demo1/Scene08SelectionChange.dart';
import 'package:delta_input_demo1/Scene09SuggestionReplace.dart';
import 'package:delta_input_demo1/NormalMode.dart';
import 'package:delta_input_demo1/weixin.dart';
import 'package:flutter/material.dart';
// import 'scenes/scene_01_single_insert.dart';
// import 'scenes/scene_02_multi_insert.dart';
// import 'scenes/scene_03_single_delete.dart';
// import 'scenes/scene_04_batch_delete.dart';
// import 'scenes/scene_05_replace.dart';
// import 'scenes/scene_06_undo_redo.dart';
// import 'scenes/scene_07_cursor_move.dart';
// import 'scenes/scene_08_selection_change.dart';
// import 'scenes/scene_09_suggestion_replace.dart';
// import 'scenes/scene_10_paste.dart';
// import 'scenes/scene_11_voice_input.dart';
// import 'scenes/scene_12_handwriting.dart';
// import 'scenes/scene_13_emoji.dart';
// import 'scenes/scene_14_composition_key.dart';
// import 'scenes/scene_15_preedit.dart';
// import 'scenes/scene_16_keyboard_hide_show.dart';
// import 'scenes/scene_17_system_undo.dart';
// import 'scenes/scene_18_accessibility.dart';
// import 'scenes/scene_19_shortcut.dart';
// import 'scenes/scene_20_multi_delta.dart';

void main() => runApp(const Delta20App());

class Delta20App extends StatelessWidget {
  const Delta20App({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Delta 20 场景',
      home: SceneMenu(),
    );
  }
}

class SceneMenu extends StatelessWidget {
  final List<String> titles = const [
    '普通模式',
    'Delta模式',
    '微信demo',
    '0 微信先选中后删除',
    '1 单字符插入',
    '2 连续插入',
    '3 单字符删除',
    '4 批量删除',
    '5 替换',
    '6 撤销/重做',
    '7 光标移动',
    '8 选择范围变化',
    '9 键盘建议条替换',
    // '10 剪贴板粘贴',
    // '11 语音输入',
    // '12 手写板输入',
    // '13 Emoji/符号',
    // '14 输入法组合键',
    // '15 预编辑组合',
    // '16 键盘隐藏/显示',
    // '17 系统撤销管理器',
    // '18 辅助功能输入',
    // '19 键盘快捷键',
    // '20 多段同时修改',
  ];

  final List<Widget Function()> builders = const [
    NormalMode.new,
    DeltaMode.new,
    WeixinPage.new,
    Scene00selectfirstthendelete.new,
    Scene01SingleInsert.new,
    Scene02MultiInsert.new,
    Scene03SingleDelete.new,
    Scene04BatchDelete.new,
    Scene05Replace.new,
    Scene06UndoRedo.new,
    Scene07CursorMove.new,
    Scene08SelectionChange.new,
    Scene09SuggestionReplace.new,
    // Scene10Paste.new,
    // Scene11VoiceInput.new,
    // Scene12Handwriting.new,
    // Scene13Emoji.new,
    // Scene14CompositionKey.new,
    // Scene15Preedit.new,
    // Scene16KeyboardHideShow.new,
    // Scene17SystemUndo.new,
    // Scene18Accessibility.new,
    // Scene19Shortcut.new,
    // Scene20MultiDelta.new,
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Delta20 场景')),
      body: ListView.builder(
        itemCount: titles.length,
        itemBuilder: (_, i) => ListTile(
          title: Text(titles[i]),
          onTap: () => Navigator.push(
            context,
            MaterialPageRoute(builder: (_) => builders[i]()),
          ),
        ),
      ),
    );
  }
}